// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SYS_INFO
// * CreateDate    : 2014-06-05 18:30:44
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:44
// * LastChanger   : 2014-06-05 18:30:44
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SysInfoEntity : EntityBase
    {
        public SysInfoTable TableSchema
        {
            get
            {
                return SysInfoTable.Current;
            }
		}
		
		public SysInfoEntity()
        {

        }
		
		public SysInfoEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.Version = Convert.ToString(CommonFunctions.ToObject(dr["VERSION"]));
			this.Sn = Convert.ToString(CommonFunctions.ToObject(dr["SN"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
        }
		
		public SysInfoEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.Name = Convert.ToString(CommonFunctions.ToObject(dr["NAME"]));
			this.Version = Convert.ToString(CommonFunctions.ToObject(dr["VERSION"]));
			this.Sn = Convert.ToString(CommonFunctions.ToObject(dr["SN"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SysInfoTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_ID)); }
            set { SetData(SysInfoTable.C_ID, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SysInfoTable.C_IS_ACTIVE)); }
            set { SetData(SysInfoTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string Name
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_NAME)); }
            set { SetData(SysInfoTable.C_NAME, value); }
        }
		
        [DataMember]
        public string Version
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_VERSION)); }
            set { SetData(SysInfoTable.C_VERSION, value); }
        }
		
        [DataMember]
        public string Sn
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_SN)); }
            set { SetData(SysInfoTable.C_SN, value); }
        }
		
        [DataMember]
        public string Description
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_DESCRIPTION)); }
            set { SetData(SysInfoTable.C_DESCRIPTION, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_CREATED_BY)); }
            set { SetData(SysInfoTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SysInfoTable.C_CREATED_DATE)); }
            set { SetData(SysInfoTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SysInfoTable.C_UPDATED_BY)); }
            set { SetData(SysInfoTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SysInfoTable.C_UPDATED_DATE)); }
            set { SetData(SysInfoTable.C_UPDATED_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

